<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>首页系统-用户管理</title>
</head>
<style>
    *{margin: 0 0;padding: 0 0;user-select: none;}
    #table-panel,th,td{border: 1px solid #000;}
    tr{height: 40px;}
    th{font-size: 16px;font-family: '微软雅黑',}
    td{font-size: 14px;font-family: '微软雅黑',}
    .choose-box{width: 40px;text-align: center;}
    .th-name,.td-name{width: 80px;text-align: left;text-indent: 10px;}
    .th-gender,.th-sex,.th-nation,.th-education,.th-marital-status,
    .td-gender,.td-sex,.td-nation,.td-education,.td-marital-status{width: 60px;text-align: center;}

    .th-phone,.th-birthday,.th-create-time,.th-state,
    .td-phone,.td-birthday,.td-create-time,.td-state{width: 120px;text-align: left;text-indent: 10px;}
    .th-email,.th-address,.td-email,.td-address{width: 200px;text-align: left;text-indent: 10px;}
    .th-marital-status,.td-marital-status{width: 120px !important;}
    .th-function,.td-function{width: 200px;text-align: center;}
    .td-function>span{padding: 0 10px;color: white;}
    .btn-select{background-color: mediumturquoise;}
    .btn-update{background-color: chocolate;}
    .btn-delete{background-color: red;}

</style>
<body>
    <h1>用户管理</h1>
    <table id="table-panel" cellspacing="1" cellpadding="1">
        <thead>
            <tr>
                <th class="choose-box"><input type="checkbox" name="item" value="all" data-id="0" /></th>
                <th class="th-name">姓名</th>
                <th class="th-gender">性别</th>
                <th class="th-sex">年龄</th>
                <th class="th-phone">手机</th>
                <th class="th-email">邮箱</th>
                <th class="th-address">住址</th>
                <th class="th-birthday">生日</th>
                <th class="th-nation">民族</th>
                <th class="th-education">学历</th>
                <th class="th-marital-status">婚姻状况</th>
                <th class="th-create-time">创建时间</th>
                <th class="th-state">状态</th>
                <th class="th-function">操作</th>
            </tr>
        </thead>
        <tbody>
            <#list userList as item>
                <tr>
                    <td class="choose-box"><input type="checkbox" name="item" value=${item.userId}  /></td>
                    <td class="td-name">${item.userName}</td>
                    <td class="td-gender">
                        <#if item.userGender == 0> 男
                            <#elseif item.userGender == 1> 女
                            <#else> 保密
                        </#if>
                    </td>
                    <td class="td-sex">${item.userAge}</td>
                    <td class="td-phone">${item.userPhone}</td>
                    <td class="td-email">${item.userEmail}</td>
                    <td class="td-address">${item.userAddress}</td>
                    <td class="td-birthday">${item.userBirthday?string("yyyy-MM-dd")}</td>
                    <td class="td-nation">${item.userNation}</td>
                    <td class="td-education">${item.userEducation!}</td>
                    <td class="td-marital-status">
                        <#if item.userMaritalStatus == 0 > 未婚
                            <#elseif item.userMaritalStatus == 1> 已婚
                            <#else> 离异
                        </#if>
                    </td>
                    <td class="td-create-time">
                        ${item.userCreateTime?string("yyyy-MM-dd")}
                    </td>
                    <td class="td-state">
                        <#if item.userState == 0> 正常-未实名
                            <#elseif item.userState == 1> 正常-已实名
                            <#else> 已注销
                        </#if>
                    </td>
                    <td class="td-function">
                        <span class="btn-function btn-select" onclick="selClick(${item.userId})">查询</span>
                        <span class="btn-function btn-update" onclick="updClick(${item.userId})">修改</span>
                        <span class="btn-function btn-delete" onclick="delClick(${item.userId})">删除</span>
                    </td>
                </tr>
            </#list>
        </tbody>
    </table>
</body>
</html>